#!/bin/sh

[ "$ACTION" = ifup -o "$ACTION" = ifupdate ] || exit 0
[ "$ACTION" = ifupdate -a -z "$IFUPDATE_ADDRESSES" -a -z "$IFUPDATE_DATA" ] && exit 0

logger -t natcapd "Reloading cone_wan_ip due to $ACTION of $INTERFACE ($DEVICE)"
/usr/sbin/natcapd cone_wan_ip

logger -t natcapd "Reloading natcap_connected due to $ACTION of $INTERFACE ($DEVICE)"
/usr/sbin/natcapd natcap_connected
